/*
**	$VER: workbench.h 40.1 (26.8.93)
*/

MODULE	'exec/nodes','exec/lists','exec/tasks','intuition/intuition'

ENUM	WBDISK=1,
		WBDRAWER,
		WBTOOL,
		WBPROJECT,
		WBGARBAGE,
		WBDEVICE,
		WBKICK,
		WBAPPICON

OBJECT OldDrawerData				// pre V36 definition
	NewWindow:NewWindow,			// args to open window
	CurrentX:LONG,					// current x coordinate of origin
	CurrentY:LONG					// current y coordinate of origin

OBJECT DrawerData
	NewWindow:NewWindow,			// args to open window
	CurrentX:LONG,					// current x coordinate of origin
	CurrentY:LONG,					// current y coordinate of origin
	Flags:ULONG,					// flags for drawer
	ViewModes:UWORD				// view mode for drawer

OBJECT DiskObject
	Magic:UWORD,					/* a magic number at the start of the file */
	Version:UWORD,					/* a version number, so we can change it */
	Gadget:Gadget,					/* a copy of in core gadget */
	Type:UBYTE,
	DefaultTool:PTR TO CHAR,
	ToolTypes:PTR TO PTR TO CHAR,
	CurrentX:LONG,
	CurrentY:LONG,
	DrawerData:PTR TO DrawerData,
	ToolWindow:PTR TO CHAR,		/* only applies to tools */
	StackSize:LONG					/* only applies to tools */

CONST	WB_DISKMAGIC=$e310,		/* a magic number, not easily impersonated */
		WB_DISKVERSION=1,			/* our current version number */
		WB_DISKREVISION=1,		/* our current revision number */
/* I only use the lower 8 bits of Gadget.UserData for the revision # */
		WB_DISKREVISIONMASK=255

OBJECT FreeList
	NumFree:WORD,
	MemList:List

/* workbench does different complement modes for its gadgets.
** It supports separate images, complement mode, and backfill mode.
** The first two are identical to intuitions GFLG_GADGIMAGE and GFLG_GADGHCOMP.
** backfill is similar to GFLG_GADGHCOMP, but the region outside of the
** image (which normally would be color three when complemented)
** is flood-filled to color zero.
*/
CONST	GFLG_GADGBACKFILL=$0001,
		GADGBACKFILL=$0001,		/* an old synonym */

/* if an icon does not really live anywhere, set its current position
** to here
*/
		NO_ICON_POSITION=$80000000

/* workbench now is a library.	this is it's name */
#define WORKBENCH_NAME 'workbench.library'

/* If you find am_Version >= AM_VERSION, you know this structure has
 * at least the fields defined in this version of the include file
 */
CONST	AM_VERSION=1

OBJECT AppMessage
	Message:Message,				/* standard message structure */
	Type:UWORD,						/* message type */
	UserData:ULONG,				/* application specific */
	ID:ULONG,						/* application definable ID */
	NumArgs:LONG,					/* # of elements in arglist */
	ArgList:PTR TO WBArg,		/* the arguements themselves */
	Version:UWORD,					/* will be AM_VERSION */
	Class:UWORD,					/* message class */
	MouseX:WORD,					/* mouse x position of event */
	MouseY:WORD,					/* mouse y position of event */
	Seconds:ULONG,					/* current system clock time */
	Micros:ULONG,					/* current system clock time */
	Reserved[8]:ULONG				/* avoid recompilation */

/* types of app messages */
ENUM	AMTYPE_APPWINDOW=7,		/* app window message	 */
		AMTYPE_APPICON,			/* app icon message	 */
		AMTYPE_APPMENUITEM		/* app menu item message */


/*
 * The following structures are private.  These are just stub
 * structures for code compatibility...
 */
OBJECT AppWindow
	private:PTR
OBJECT AppIcon
	private:PTR
OBJECT AppMenuItem
	private:PTR
